package com.lmk.t3;

import javax.print.DocFlavor;
import java.security.KeyStore;

public class Cat implements Comparable<Cat> {
    private String  name;
    private String color;
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", color='" + color + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public int compareTo(Cat cat) {

        return this.age-cat.age;
    }
}
